package com.eostoken.eos_wallet.utils;

import android.os.Environment;

import com.eostoken.eos_wallet.ui.fragment.ActiveFragment;

import java.io.File;
import java.math.BigDecimal;

public interface Constants {

    boolean ISTEST = true;
    boolean ISTESTURL = false;
    boolean ISTESTURLEOS = false;
    ///////////////////////////////////////////////////
    /**
     * 网络请求超时时间毫秒
     */
    int DEFAULT_TIMEOUT = 20000;
    //////////////////////////////////////////////////
    String HOST = "";

    /**
     * 正式域名
     */
    String PRODUCT_URL = "https://api.mgpchain.com/";//https://api.mgpchain.com/api/appVersion/getVersion
    String TEST_URL = "https://api.coom.pub/";//http://47.56.124.233:18888/";
    String GUOYU_TEST_URL = "http://172.16.11.239:8888/";

    String URL_EOS = "http://explorer.mgpchain.io:8000";
    String TEST_URL_EOS = "https://jungle2.cryptolions.io";
    String AYING_TEST_URL_EOS = "http://47.56.127.227:8888";

    // "https://eos.greymass.com";
    String TRANSACTION_DETAILS_URL = "https://explorer.mgpchain.io/transaction/";//交易详情
    String EXCHANGE_URL_EOS = "https://api.bkex.co/";//price?

    String EOS_PATH = "m/44'/194'/0'/0/0";
    String EOS_URL = "EOS_URL";
    String CORPORATION_URL = "CORPORATION_URL";
    String TESTURL = "TEST_URL";
    String EXCHANGE_URL = "EXCHANGE_URL";
    String GUOYU_URL = "GUOYU_URL";
    String AYING_URL = "AYING_URL";

    String OFFICIAL_URL_EOS = "OFFICIAL_URL_EOS";
    String TESTURL_EOS = "TESTURL_EOS";
    String AYING_URL_EOS = "AYING_URL_EOS";
    //////////////////////////////////////////////////
    String SP_APPCONSTAN = "app_constant";
    String IS_TEST = "isTest";
    String IS_FIRST_IN = "isFirstIn";
    String SP_BROWSER = "browser";
    //////////////////////////////////////////////////

    boolean DEFAULT_SKIP_SIGNING = true;

    String DEFAULT_SERVANT_ACCOUNT = "eosio";

    String DEFAULT_WALLET_NAME = "default";
    boolean DEFAULT_SAVE_PASSWORD = true;

    String SAMPLE_PRIV_KEY_FOR_TEST = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3";

    String EOSIO_SYSTEM_CONTRACT_CODE = "eosio";//合约托管账号名称，字符串 "buyram" : "sellram"; "delegatebw" : "undelegatebw"
    String EOSIO_TOKEN_CONTRACT_CODE = "eosio.token";//合约托管账号名称，字符串 transfer
    String BUYRAM_ACTION = "buyram";
    String SELLRAM_ACTION = "sellram";
    String DELEGATEBW_ACTION = "delegatebw";
    String UNDELEGATEBW_ACTION = "undelegatebw";
    String TRANSFER_ACTION = "transfer";
    int TX_EXPIRATION_IN_MILSEC = 30000;
    String contractAddress = "addressbookt";//合约地址：主要用于抵押
    String DEFAULT_SYMBOL_STRING = "SYS";
    int DEFAULT_SYMBOL_PRECISION = 4;

    String MGP_SYMBOL = "MGP";
    String PRICE_MGP = "MGP_USDT";
    ////////////////////////////////////////////////
    String TAG_MGP = "TAG_EOS";
    String BaseFilePath = Environment.getExternalStorageDirectory() + File.separator + "EOSToken";
    String CrashFilePath = BaseFilePath + File.separator + "Crash";
    String WalletFilePath = BaseFilePath + File.separator + "Wallet";
    String CropimageFilePath = BaseFilePath + File.separator + "cropimage";
    String REGEX_ACCOUNT_NAME = "^[a-z1-5]{12}$";
    ///////////////////////////////////////////////
    String EXTRA_ADD_WALLET_WAY = "extra_add_wallet_way";
    String EXTRA_WALLET_MNEMONIC = "extra_wallet_mnemonic";
    String EXTRA_WALLET_NAME = "extra_wallet_name";
    String EXTRA_WALLET_PASSWORD = "extra_wallet_password";
    String EXTRA_WALLET_PASSWORDHIT = "extra_wallet_passwordHit";
    String EXTRA_WALLET = "extra_wallet";
    String EXTRA_IMPORT_WALLET_WAY = "extra_import_wallet_way";
    String EXTRA_WALLET_PRIVATEKEY = "extra_wallet_private_key";
    String EXTRA_TRANSACTION = "extra_transaction";
    String EXTRA_MORTGAGE = "extra_mortgage";
    String EXTRA_ACCOUNT_NAME = "extra_account_name";
    String EXTRA_ACCOUNT_INFO = "extra_account_info";
    String EXTRA_INTERSECTION = "extra_intersection";
    String EXTRA_TRANSACTION_ID = "extra_transaction_id";
    String EXTRA_HINT = "extra_hint";
    String EXTRA_CREATE_ACCOUNT_DATA = "extra_create_account_data";
    String EXTRA_WALLETS_LIST = "extra_wallets_list";
    String EXTRA_TRANSACTION_LIST = "extra_transaction_list";
    String EXTRA_TO_URL = "extra_to_url";

    String INTENT_EXTRA_KEY_QR_SCAN = "qr_scan_result";
    String INTENT_EXTRA_KEY_WALLET = "wallet_result";

    int IMPORT_WALLET_PRIVATEKEY = 0;
    int IMPORT_WALLET_MNEMONIC = 1;
    int ADD_WALLET_FAIL = 0;//添加钱包失败
    int ADD_WALLET_SUCCEED = 1;//添加钱包成功
    int INVALID = 0;//校验钱包是否有效（私钥 or 账户名）,无效
    int VALID = 1;//校验钱包是否有效（私钥 or 账户名）,有效
    /////////////////Fragment////////////////////
    int TO_TRANSFER_WALLET = 1;//转账transfer 二维码json数据定义
    int TO_IMPORT_WALLET_PRIVATEKEY = 2;//导出私钥 二维码json数据定义
    int TO_CREATE_WALLET = 3;//创建钱包 二维码json数据定义
    int TO_IMPORT_WALLET_MNEMONIC = 4;//创建钱包 二维码json数据定义

    int ADD_WALLET = 0;//创建添加 AddWalletFragment
    int CREATE_WALLET = 1;//创建添加 CreateAccountFragment
    int IMPORT_WALLET = 2;//导入添加
    int BACKUP_MNEMONIC = 3;//生成助记词BackupMnemonicFragment
    int CONFIRM_MNEMONIC = 4;//助记词比较ConfirmMnemonicFragment
    int ACTIVE = 5;//ActiveFragment
    int CUT_WALLET = 6;//主界面
    int WALLET_INFO = 7;//点击钱包
    int RESOURCE_ADMINISTRATION = 8;//资源管理
    int PROCEEDS = 9;//点击钱包proceeds
    int ADD_WALLET_IN = 10;//点击钱包proceeds
    int ASSIST_CREATE_WALLET = 11;//协助创建钱包 Management
    int WALLET_MANAGEMENT = 12;//钱包管理
    int LANGUAGE_SETUP = 13;//语言设置
    int WALLET_LIST = 14;//钱包列表
    int ACTIVATE_ACCOUNT = 15;//激活账户activate the account
    int CHANGE_PASSWORD = 16;//修改密码 change password
    int PERMISSIONS_VIEW = 17;//权限查看 PermissionsViewFragment
    int TRANSFER = 18;//转账 PermissionsViewFragment

    int MY_STIMULATE = 19;//我的激励 ExtractionYieldFragment
    int MINING_INDEX = 20;//挖矿指数 MiningIndexFragment
    int MINING_MORTGAGE = 21;//MiningMortgageFragment
    int MORTGAGE_BIG = 22;// MortgageBigFragment
    int MORTGAGE_REDEEM = 23;//MortgageOrRedeemFragment
    int AGENCY_VOTE = 24;//AgencyVoteFragment
    int BUY_SELL_RAM = 25;//BuyOrSellRamFragment
    int MY_STIMULATE_2 = 26;//MyStimulateFragment
    int PRIVATE_KEY = 27;//PrivateKeyFragment
    int STIMULATE_LIST = 28;//StimulateListFragment
    int TRANSACTION_DETAILS = 29;//TransactionDetailsFragment
    int VOTE = 30;//VoteFragment
    int WALLET_FUNCTION = 31;//WalletFunctionFragment
    /////////////////////////////////////
    String MSG_WALLET_STORE_FAIL = "store_wallet_failed";
    String MSG_WALLET_NOT_FOUND = "wallet_not_found";
    String MSG_WALLET_EXISTS = "address_already_exist";
    ///////////////////////////////////////////
    int REQUEST_SCAN_CODE = 1000;
    int REQUEST_CUT_WALLET = 1001;
    ////////////////EOS账号信息////////////////////
//    String privateKey = "5KE2yDWSEZ4RgH6i1Q6Nw4n1xTdV6KoaYZ1pGMeP6LUBh2a5JyR";
//    String publicKey = "EOS8jnnaSGDwAMAvDXyLpwUx5jAjMQW5ie991SU8bp4itdz2avLH7";
//    String accountname = "algorguo1234";

    /////////////////获取接口的编号///////////////////////////
    int BALANCE = 0;//getCurrencyBalance获取EOS余额
    int ACCOUNTS = 1;//getKeyAccounts获取账号名组
    int PRICE = 2;//getDIGICCYPrice获取交易所的EOS价格
    int GETINFO = 3;//getinfo获取链的信息
    int ACCOUNT_INFO = 4;//getAccount获取账号的基本信息
    int BILL = 5;//getActions获取交易历史记录
    int TRANSACTION = 6;//getTransaction获取交易数据
    int FIND_MID = 7;//getFind获取MID
    int ORDER_INDEX = 8;//getOrderIndex获取MID
    int TABLE_ROWS = 9;//getTableRows
    int TEALTIME_INDEX = 10;//getRealTimeIndex获取实时数据
    int MORTGAGE = 11;//getMortgageAssociation 社群
    int BIND_MID = 12;//getBindMid 绑定mid
    int NODE_INDEX = 13;//getNodeIndex Mango节点
    int MY_ORDER = 14;//getMyOrderWallet 我的激励
    int WITHD_RAW_INDEX = 15;// getWithdrawIndex
    int ADD_ORDER = 16;//getWithdrawAddOrder 提取收益
    int INDEX_MARK = 17;//getIndexMarkIndex 挖矿指数
    int GET_BIND_ADDRESS = 18;//getBindWalletAddress获取钱包绑定地址
    int BIND_ADDRESS = 19;//bindWalletAddress绑定钱包地址
    int GET_RAM_PRICE = 20;//getTableRows获取内存价格
    int CHECK_ADDR = 21;//checkAddr检测地址或账户名是否绑定
    int IS_FIND_MID = 22;//isFindMIDBinding检查绑定MID的地址是否在绑定中
    int MY_MGP_ORDER = 23;//getMiningOrderIncome云矿机收益明细

    ///////////////////////sp//////////////////////
    String SP_WALLET = "sp_wallet";
    String KEY_WALLET = "key_wallet";
    String SP_MangoWallet_info = "sp_mangowallet_info";
    String KEY_SERVER = "key_server";
    String KEY_EOS_SERVER = "key_eos_server";
    String KEY_CURRENT_ACCOUNT_NAME = "current_account_name";//当前钱包账户名
    String KEY_CURRENT_WALLET_PRIVATEKEY = "current_wallet_privateKey";//当前钱包账户名
    String KEY_LANGUAGE_SETUP = "key_language_setup";
    int WALLET_EXIST = 0;//exist
    int WALLET_INEXISTENCE = 1;//inexistence
    int SQL_FAIL = -1;//查询失败（数据库问题）
    int lang_system_language = 0;
    int lang_english = 1;
    int lang_japanese = 2;
    int lang_korean = 3;
    int lang_simplified_chinese = 4;
    int lang_traditional_chinese = 5;
    /////////////////BusUtils////////////////////////
    String BUS_TO_WALLET = "bus_to_wallet";
    String BUS_DELETE_WALLET = "bus_delete_wallet";

    int keySize = 1024;
    String transformation = "RSA/None/PKCS1Padding";
    BigDecimal bdCurrencyAmount = new BigDecimal("500000000");
}
